package spatialmarketplace.cem.model;

import java.io.Serializable;
import java.util.List;
import net.sourceforge.stripes.action.FileBean;

/**
 *
 * @author Laura Andreina
 */
public class Group extends ModelBase implements Serializable {

    private Integer groupId;
    private String name = "";
    private boolean isPublic;
    private boolean memberCanInvite;
    private boolean forumIsPublic;
    private boolean memberCanPublishResources;
    private boolean adsEnabled;
    private String logo;
    private FileBean file;
    private String description;
    private String accessType;
    private String keyword;
    private List<User> users;

    /**
     * Constructor
     *
     * @param name
     * @param logo
     * @param description
     * @param accessType
     * @param keyword
     * @param users
     */
    public Group(String name, String logo, String description, String accessType, String keyword, List<User> users) {
        this.name = name;
        this.logo = logo;
        this.description = description;
        this.accessType = accessType;
        this.keyword = keyword;
        this.users = users;
    }

    /**
     * Constructor
     *
     * @param groupId
     * @param name
     * @param isPublic
     * @param memberCanInvite
     * @param forumIsPublic
     * @param memberCanPublishResources
     * @param adsEnabled
     * @param logo
     * @param description
     * @param accessType
     * @param keyword
     */
    public Group(Integer groupId, String name, boolean isPublic, boolean memberCanInvite, boolean forumIsPublic, boolean memberCanPublishResources,
            boolean adsEnabled, String logo, String description, String accessType, String keyword) {
        this.groupId = groupId;
        this.name = name;
        this.isPublic = isPublic;
        this.memberCanInvite = memberCanInvite;
        this.forumIsPublic = forumIsPublic;
        this.memberCanPublishResources = memberCanPublishResources;
        this.adsEnabled = adsEnabled;
        this.logo = logo;
        this.description = description;
        this.accessType = accessType;
        this.keyword = keyword;

    }

    public boolean isAdsEnabled() {
        return adsEnabled;
    }

    public void setAdsEnabled(boolean adsEnabled) {
        this.adsEnabled = adsEnabled;
    }

    public boolean isForumIsPublic() {
        return forumIsPublic;
    }

    public void setForumIsPublic(boolean forumIsPublic) {
        this.forumIsPublic = forumIsPublic;
    }

    public boolean isMemberCanInvite() {
        return memberCanInvite;
    }

    public void setMemberCanInvite(boolean memberCanInvite) {
        this.memberCanInvite = memberCanInvite;
    }

    public boolean isMemberCanPublishResources() {
        return memberCanPublishResources;
    }

    public void setMemberCanPublishResources(boolean memberCanPublishResources) {
        this.memberCanPublishResources = memberCanPublishResources;
    }

    public Group() {
    }

    public Group(String n) {
        name = n;
    }

    public String getAccessType() {
        return accessType;
    }

    public void setAccessType(String accessType) {
        this.accessType = accessType;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Integer getGroupId() {
        return groupId;
    }

    public void setGroupId(Integer groupId) {
        this.groupId = groupId;
    }

    public List<User> getUsers() {
        return users;
    }

    public void setUsers(List<User> users) {
        this.users = users;
    }

    public boolean isIsPublic() {
        return isPublic;
    }

    public void setIsPublic(boolean isPublic) {
        this.isPublic = isPublic;
    }

    public String getKeyword() {
        return keyword;
    }

    public void setKeyword(String keyword) {
        this.keyword = keyword;
    }

    public FileBean getFile() {
        return file;
    }

    public void setFile(FileBean file) {
        this.file = file;
    }

    public String getLogo() {
        return logo;
    }

    public void setLogo(String logo) {
        this.logo = logo;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "Group{" + "groupId=" + groupId + ", name=" + name + ", isPublic=" + isPublic + ", memberCanInvite=" + memberCanInvite + ", forumIsPublic=" + forumIsPublic + ", memberCanPublishResources=" + memberCanPublishResources + ", adsEnabled=" + adsEnabled + ", logo=" + logo + ", file=" + file + ", description=" + description + ", accessType=" + accessType + ", keyword=" + keyword + ", users=" + users + '}';
    }
}
